package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 审核人员关联表
 * </p>
 *
 * @author sy
 * @since 2024-02-27
 */
@Getter
@Setter
@TableName("dragon_examine_user")
public class ExamineUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 审核主表id
     */
    private Integer examineId;

    /**
     * 当前审核人id
     */
    private Integer auditUserId;

    /**
     * 审核状态：0：待审核，1：同意，2：拒绝
     */
    private Integer status;

    /**
     * 上一审核状态：0，未审核，1、同意，2，不同意
     */
    private Integer preStatus;

    /**
     * 审核类型：1，审核，2、反审核
     */
    //private Integer examineType;

    /**
     * 意见
     */
    private String opinion;

    /**
     * 审核人名称
     */
    @TableField(exist = false)
    private String username;

    /**
     * 审核人名称
     */
    @TableField(exist = false)
    private String auditName;

    /**
     * 附件
     */
    @TableField(exist = false)
    private List<ExamineFile> examineFiles;

    /**
     * 流程id
     */
    @TableField(exist = false)
    private Integer type;

    /**
     * 主表id
     */
    @TableField(exist = false)
    private Integer mainId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;


}
